<html>
<!-- <body onload="domclick()"> -->
<body>
<script type="text/javascript" src="@res("/static/js/jquery-1.10.2.min.js")"></script>
<input id="hei" type="button" value="hehe" onclick="copy('已复制哦!')"/>
</body>
</html>
<script>


	function copy1(url){
   	 var oInput = document.createElement('input');
   	 var dd = new Date();
   	 url = dd.toLocaleString()+url;
        oInput.value = url;
        document.body.appendChild(oInput);
        oInput.select(); // 选择对象
        var ss = document.execCommand("Copy",true); // 执行浏览器复制命令
        
        alert('复制成功'+ss);
   }
	function copy(s){
		   if(window.clipboardData){
			   alert(1);
		      window.clipboardData.setData('text',s);
		   }else{
			   alert(2);
		      document.oncopy=function(e){
		         e.clipboardData.setData('text',s);
		         e.preventDefault();
		         document.oncopy=null;
		      }
		      document.execCommand('Copy');
		   }
		}
	function domclick(){
		alert(1);
		$("#hei").click();
	}
	$(document).ready(function () {
		alert(document);
		$("#hei").click();
	});
// 	location.href="http://www.baidu.com";
</script>
